﻿<UserControl x:Class="QA.Wpf.ucDbConnectionManagerView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="50" d:DesignWidth="772">
    <UserControl.Resources>
        <Style TargetType="Button">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid>
                            <Ellipse Stroke="Black"
                            StrokeThickness="1">
                                <Ellipse.Fill>
                                    <RadialGradientBrush>
                                        <GradientStop Offset="0"
                                            Color="White" />
                                        <GradientStop Offset="1"
                                            Color="Red" />
                                        <RadialGradientBrush.Transform>
                                            <TransformGroup>
                                                <ScaleTransform ScaleY="0.65" />
                                            </TransformGroup>
                                        </RadialGradientBrush.Transform>
                                    </RadialGradientBrush>
                                </Ellipse.Fill>
                            </Ellipse>
                            <ContentPresenter HorizontalAlignment="Center"
                                    VerticalAlignment="Center"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Cursor" Value="Hand"/>
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="Button">
                                <Grid>
                                    <Ellipse Stroke="Black" StrokeThickness="1">
                                        <Ellipse.Fill>
                                            <RadialGradientBrush>
                                                <GradientStop Offset="0"
                                            Color="White" />
                                                <GradientStop Offset="1"
                                            Color="#FFD40202" />
                                                <RadialGradientBrush.Transform>
                                                    <TransformGroup>
                                                        <ScaleTransform ScaleY="0.65" />
                                                    </TransformGroup>
                                                </RadialGradientBrush.Transform>
                                            </RadialGradientBrush>
                                        </Ellipse.Fill>
                                    </Ellipse>
                                    <ContentPresenter HorizontalAlignment="Center"
                                    VerticalAlignment="Center"/>
                                </Grid>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Trigger>
            </Style.Triggers>
        </Style>
    </UserControl.Resources>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="25"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="50"/>
            <ColumnDefinition Width="210"/>
            <ColumnDefinition Width="20"/>
            <ColumnDefinition Width="70"/>
            <ColumnDefinition Width="210"/>
        </Grid.ColumnDefinitions>
        <ComboBox HorizontalAlignment="Left" VerticalAlignment="Top" Width="202" Grid.Column="1" Grid.Row="1" Margin="1,2,0,0" ItemsSource="{Binding Connections}" SelectedItem="{Binding CurrentConnection}" />
        <Label Content="Server" HorizontalAlignment="Left" Margin="0" VerticalAlignment="Top" Grid.Row="1"/>
        <Button Click="btnConnect_Click"  HorizontalAlignment="Left" Margin="1,6,0,0" VerticalAlignment="Top" Width="16" Height="15" Grid.Column="2" Grid.Row="1"/>
        <ComboBox  HorizontalAlignment="Left" Margin="1,2,0,0" VerticalAlignment="Top" Width="202" Grid.Column="4" Grid.Row="1"/>
        <Label Content="Databases" HorizontalAlignment="Left" Margin="0" VerticalAlignment="Top" Grid.Column="3" Grid.Row="1"/>
        

    </Grid>
</UserControl>
